Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

280
Visualizações
How can I fix this "missing module" error (node.js/discord.js)?

Here's the code, I was trying to run a discord bot file.

$ node index.js
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'node:events'
Require stack:
- /path/bot/node_modules/discord.js/src/client/BaseClient.js
- /path/bot/node_modules/discord.js/src/index.js
- /path/bot/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/path/bot/node_modules/discord.js/src/client/BaseClient.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/path/bot/node_modules/discord.js/src/client/BaseClient.js',
    '/path/bot/node_modules/discord.js/src/index.js',
    '/path/bot/index.js'
  ]
}

What module would be missing? I haven't really fiddled around with node.js much, or discord.js, so I have no idea what could be going wrong. Plz help :)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you're using discord.js version 13+ you need to upgrade to Node.js version 16.+. Otherwise you won't be able to run the bot

Simply visit Node.js and either install the LTS (recommended) version or the current

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda